package com.example.microserviceorderservice.Mapper;

import com.example.microserviceorderservice.entity.Order;
import org.apache.ibatis.annotations.*;

import java.util.List;


@Mapper
public interface OrderMapper {
    @Select("select * from tb_order where id = #{id}")
    List<Order> getOrderById(int id);
    @Select("select * from tb_order where userid = ("+
            "select id from tb_user where username = #{userName})")
    List<Order> getOrderByUserName(String userName);
}
